/**
 * 
 */
package com.gragra.distances;
import com.gragra.sampling.vector.VectorStructure;
/**
 * This interface implements some methods inpired by what a mean in a K-Means-Clustering Algorithm would do
 * @author Christoph Teichmann
 * created Apr 30, 2013 2:23:55 PM
 * @version 0.1
 */
public interface Mean
{
	/**
	 * adds a new vector to the set of vectors from which the final mean is to be estimated
	 * @param entry
	 */
	void add(VectorStructure entry);
	/**
	 * this method is used to create the necessary mean from the vectors added so far, calling this method
	 * more than once may lead to unpredictable results
	 */
	void set();
	/**
	 * this method is used to calculate the distance from the mean that has been calculated, a call to this
	 * method can only be expected to return reasonable results once the set() method has been called
	 * @param vs
	 * @return
	 */
	double getDistance(VectorStructure vs);
	/**
	 * returns true if no VectorStructures have been added the mean so far
	 * @return
	 */
	boolean empty();
}